<template>
  <div class="hosp_cell">
    <div class="avatar">
      <nuxt-link :to="`/hospital/${info.id}`" v-if="isLink">
        <li-image :src="info.logo" class="img" v-if="info.logo" />
        <img src="@/assets/images/avatar/org_default.png" class="img" alt="" v-else>
      </nuxt-link>
      <template v-else>
        <li-image :src="info.logo" class="img" v-if="info.logo" />
        <img src="@/assets/images/avatar/org_default.png" class="img" alt="" v-else>
      </template>
      
      <!-- <img src="@/assets/images/home/goods.png" class="img" alt=""> -->
    </div>
    <div class="info_box">
      <div class="title"><nuxt-link :to="`/hospital/${info.id}`" v-if="isLink">{{ info.name }}</nuxt-link><template v-else>{{ info.name }}</template></div>
      <div class="score_box">
        <div class="score">
          <!-- <el-rate v-model="info.initScore" class="li_rate" disabled allow-half></el-rate> -->
          <li-rate v-model="info.initScore" disabled></li-rate>
        </div>
        <div class="review">{{ info.commentCnt || 0 }}条评价</div>
      </div>
      <div class="address">
        所在位置：{{ info.province }}{{ info.city }}{{ info.district
        }}{{ info.address }}
      </div>
    </div>
  </div>
</template>
<script>
import { Rate } from "element-ui";
export default {
  name: "ShopHosp",
  props: {
    info: {
      type: Object,
      default: function () {
        return {};
      },
    },
    isLink:{
      type:Boolean,
      default:true
    }
  },
  components: {
    [Rate.name]: Rate,
  },
  data() {
    return {};
  },
};
</script>
<style lang="less" scoped>
@import "./shopHosp.less";
</style>